package com.shigui.news.utils;


public class Single {
	
	private static final Single single = new Single();
	
	private Single(){
		
	}
	public static final Single getSingle(){
		
		return single;
	}
	
	/*
	private static Single single = null;
	
	private Single(){
		
	}
	/**
	 * 可以不加final
	 * 因为静态方法只在编译期间执行一次初始化，也就是只会有一个对象。
	 * @return
	 *
	public static final Single getSingle(){
		
		if(single == null){
			
			synchronized(Single.class){
				if(single == null){
					
					single = new Single();
				}
			}
			
		}
		return single;
	}
	*/
}
